﻿<UserControl x:Class="Newgen.Controls.WidgetControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="this" AllowDrop="True" Background="Transparent" MouseLeave="UserControlMouseLeave" MouseLeftButtonDown="UserControlMouseLeftButtonDown" MouseLeftButtonUp="UserControlMouseLeftButtonUp" Opacity="0" RenderTransformOrigin="0.5,0.5">
    <UserControl.Resources>
        <Storyboard x:Key="LoadAnim" Completed="StoryboardCompleted" FillBehavior="Stop">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" DecelerationRatio="0.7" Duration="0:0:0.4" From="0.8" To="1" />
            <DoubleAnimation Storyboard.TargetName="Translate" Storyboard.TargetProperty="X" DecelerationRatio="0.7" Duration="0:0:0.6" From="150" To="0" />
            <DoubleAnimation Storyboard.TargetName="this" Storyboard.TargetProperty="Opacity" Duration="0:0:0.4" From="0" To="1" />
        </Storyboard>
        <Storyboard x:Key="MouseDownAnim">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" AccelerationRatio="0.3" DecelerationRatio="0.7" Duration="0:0:0.05" To="0.95" />
        </Storyboard>
        <Storyboard x:Key="MouseUpAnim">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" AccelerationRatio="0.3" DecelerationRatio="0.7" Duration="0:0:0.05" To="1" />
        </Storyboard>
    </UserControl.Resources>
    <UserControl.RenderTransform>
        <TransformGroup>
            <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="{Binding ElementName=Scale, Path=ScaleX}" />
            <TranslateTransform x:Name="Translate" />
        </TransformGroup>
    </UserControl.RenderTransform>
    <!--Background="#0f92d6"-->
    <Grid Name="Root"></Grid>
</UserControl>